# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
services:
  mssql:
    image: {{mssqlDockerImageWithVersion}}
    # volumes:
    #   - ~/volumes/jhipster/{{baseName}}/mssql/:/var/lib/mssql/
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=yourStrong(!)Password
      - MSSQL_DATABASE={{baseName}}
      - MSSQL_PID=Express
      - MSSQL_SLEEP=60
    # If you want to expose these ports outside your dev PC,
    # remove the "127.0.0.1:" prefix
    ports:
      - '127.0.0.1:1433:1433'
    command: /bin/bash -c '/opt/mssql/bin/sqlservr & echo "wait $$MSSQL_SLEEP sec for DB to start "; sleep $$MSSQL_SLEEP; /opt/mssql-tools/bin/sqlcmd -U sa -P $$SA_PASSWORD -d tempdb -q "EXIT(CREATE DATABASE $$MSSQL_DATABASE)"; wait;'
